package model.analyzer;

import edu.smu.tspell.wordnet.NounSynset;
import edu.smu.tspell.wordnet.Synset;
import edu.smu.tspell.wordnet.SynsetType;
import edu.smu.tspell.wordnet.WordNetDatabase;

public class WordNetTest {
	public static void main(String[] args) {
		System.setProperty("wordnet.database.dir", "D:\\Program Files (x86)\\WordNet\\2.1\\dict");
		
		NounSynset nounSynset; 
		NounSynset[] hyponyms; 

		WordNetDatabase database = WordNetDatabase.getFileInstance(); 
//		Synset[] ss = database.getSynsets("methodic");
		SynsetType[] types = SynsetType.ALL_TYPES;
		for(SynsetType st : types) {
			String[] baseForm = database.getBaseFormCandidates("runnable", st);
			System.out.println(baseForm.length);
		}
		//Synset[] synsets = database.getSynsets("fly", SynsetType.NOUN);
//		for (int i = 0; i < synsets.length; i++) { 
//		    nounSynset = (NounSynset)(synsets[i]); 
//		    hyponyms = nounSynset.getHyponyms(); 
//		    System.err.println(nounSynset.getWordForms()[0] + 
//		            ": " + nounSynset.getDefinition() + ") has " + hyponyms.length + " hyponyms"); 
//		}
	}
}
